Source for file config.php

Documentation is available at config.php

  1. <?php 
  2. /*
  3.  * FCKeditor - The text editor for internet
  4.  * Copyright (C) 2003-2005 Frederico Caldeira Knabben
  5.  * 
  6.  * Licensed under the terms of the GNU Lesser General Public License:
  7.  *         http://www.opensource.org/licenses/lgpl-license.php
  8.  * 
  9.  * For further information visit:
  10.  *         http://www.fckeditor.net/
  11.  * 
  12.  * File Name: config.php
  13.  *     Configuration file
  14.  * 
  15.  * File Authors:
  16.  *         Grant French (grant@mcpuk.net)
  17.  */
  18.  
  19. /*------------------------------------------------------------------------------*/
  20. /* HTTP over SSL Detection (shouldnt require changing)                */
  21. /*------------------------------------------------------------------------------*/
  22. $fckphp_config['prot']="http";
  23. $fckphp_config['prot'].=((isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on')?"s":"");
  24. $fckphp_config['prot'].="://";
  25. /*==============================================================================*/
  26.  
  27.  
  28. /*------------------------------------------------------------------------------*/
  29. /* The physical path to the document root, Set manually if not using apache    */
  30. /*------------------------------------------------------------------------------*/
  31. $fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT'];
  32. //$fckphp_config['basedir'] = 'D:\Work\FCKEditor\www\FCKeditor.V2\editor\filemanager\browser\mcpuk' ;
  33. /*==============================================================================*/
  34.  
  35.  
  36. /*------------------------------------------------------------------------------*/
  37. /* Prefix added to image path before sending back to editor            */
  38. /*------------------------------------------------------------------------------*/
  39. $fckphp_config['urlprefix']=$fckphp_config['prot'].$_SERVER['SERVER_NAME'];
  40. /*==============================================================================*/
  41.  
  42.  
  43. /*------------------------------------------------------------------------------*/
  44. /* Path to user files relative to the document root (no trailing slash)        */
  45. /*------------------------------------------------------------------------------*/
  46. $fckphp_config['UserFilesPath'"/UserFiles" ;
  47.  
  48. /*==============================================================================*/
  49.  
  50.  
  51. /*------------------------------------------------------------------------------*/
  52. /* Progressbar handler (script that monitors upload progress) (''=none)
  53. /*------------------------------------------------------------------------------*/
  54. // $fckphp_config['uploadProgressHandler']=''; //No upload progress handler
  55. $fckphp_config['uploadProgressHandler']=$fckphp_config['prot'].$_SERVER['SERVER_NAME']."/cgi-bin/progress.cgi"//Perl upload progress handler
  56. /*==============================================================================*/
  57.  
  58.  
  59. /*------------------------------------------------------------------------------*/
  60. /* Authentication (auth) :-                                */
  61. /*  - Req        :: Boolean, whether authentication is required        */
  62. /*  - HandlerClass    :: Name of class to handle authentication in connector    */
  63. /*------------------------------------------------------------------------------*/
  64. $fckphp_config['auth']['Req']=false;
  65. $fckphp_config['auth']['HandlerClass']='Default';
  66. /*==============================================================================*/
  67.  
  68.  
  69. /*------------------------------------------------------------------------------*/
  70. /* Settings for authentication handler :-                    */
  71. /*  - SharedKey :: Shared encryption key (as set in test.php in example)    */
  72. /*------------------------------------------------------------------------------*/
  73. $fckphp_config['auth']['Handler']['SharedKey']="->Shared_K3y-F0R*5enD1NG^auth3nt1caT10n'Info/To\FILE,Brow5er--!";
  74. /*==============================================================================*/
  75.  
  76.  
  77. /*------------------------------------------------------------------------------*/
  78. /* Per resource area settings:-                            */
  79. /* - AllowedExtensions    :: Array, allowed file extensions (in lowercase)    */
  80. /* - AllowedMIME    :: Array, allowed mime types (in lowercase)        */
  81. /* - MaxSize        :: Number, Maximum size of file uploads in KBytes    */
  82. /* - DiskQuota        :: Number, Maximum size allowed for the resource area    */
  83. /* - HideFolders    :: Array, RegExp, matching folder names will be hidden    */
  84. /* - HideFiles        :: Array, RegExp, matching file names will be hidden    */
  85. /* - AllowImageEditing    :: Boolean, whether images in this area may be edited    */
  86. /*------------------------------------------------------------------------------*/
  87. //First area options are commented
  88.  
  89. //File Area
  90. $fckphp_config['ResourceAreas']['File'=array(
  91.     
  92.     //Files(identified by extension) that may be uploaded to this area
  93.     'AllowedExtensions'    =>    array("zip","doc","xls","pdf","rtf","csv","jpg","gif","jpeg","png","avi","mpg","mpeg","swf","fla"),
  94.     
  95.     //Not implemented yet
  96.     'AllowedMIME'        =>    array(),
  97.     
  98.     //Set the maximum single upload to this area to 2MB (2048Kb)
  99.     'MaxSize'        =>    2048,
  100.     
  101.     //Set disk quota for this resource area to 20MB
  102.     'DiskQuota'        =>    -1,
  103.     
  104.     //By Default hide all folders starting with a . (Unix standard)
  105.     'HideFolders'        =>    array("^\.")
  106.     
  107.     //By Default hide all files starting with a . (Unix standard)
  108.     'HideFiles'        =>    array("^\.")
  109.     
  110.     //Do not allow images to be edited in this resource area
  111.     'AllowImageEditing'    =>    false
  112.     );
  113.  
  114. //Image area
  115. $fckphp_config['ResourceAreas']['Image'=array(
  116.     'AllowedExtensions'    =>    array("jpg","gif","jpeg","png","tiff","tif",),
  117.     'AllowedMIME'        =>    array(),
  118.     'MaxSize'        =>    1024,
  119.     'DiskQuota'        =>    -1,
  120.     'HideFolders'        =>    array("^\."),
  121.     'HideFiles'        =>    array("^\."),
  122.     'AllowImageEditing'    =>    false //Not yet complete, but you can take a look and see
  123.     );
  124.  
  125. //Flash area
  126. $fckphp_config['ResourceAreas']['Flash'=array(
  127.     'AllowedExtensions'    =>    array("swf","fla"),
  128.     'AllowedMIME'        =>    array(),
  129.     'MaxSize'        =>    1024,
  130.     'DiskQuota'        =>    -1,
  131.     'HideFolders'        =>    array("^\."),
  132.     'HideFiles'        =>    array("^\."),
  133.     'AllowImageEditing'    =>    false
  134.     );
  135.     
  136. //Media area
  137. $fckphp_config['ResourceAreas']['Media'=array(
  138.     'AllowedExtensions'    =>    array("swf","fla","jpg","gif","jpeg","png","avi","mpg","mpeg"),
  139.     'AllowedMIME'        =>    array(),
  140.     'MaxSize'        =>    5120,
  141.     'DiskQuota'        =>    -1,
  142.     'HideFolders'        =>    array("^\."),
  143.     'HideFiles'        =>    array("^\."),
  144.     'AllowImageEditing'    =>    false
  145.     );
  146.     
  147. /*==============================================================================*/        
  148.  
  149.  
  150. /*------------------------------------------------------------------------------*/
  151. /* Global Disk Quota - Max size of all resource areas                */
  152. /*------------------------------------------------------------------------------*/
  153. $fckphp_config['DiskQuota']['Global']=-1//In MBytes (default: 50mb)
  154. /*==============================================================================*/
  155.  
  156.  
  157. /*------------------------------------------------------------------------------*/
  158. /* Directory and File Naming :-                            */
  159. /*  -MaxDirNameLength    :: Maximum allowed length of a directory name        */
  160. /*  -DirNameAllowedChars :: Array of characters allowed in a directory name    */
  161. /*  -FileNameAllowedChars :: Array of characters allowed in a file name        */
  162. /*------------------------------------------------------------------------------*/
  163.  
  164. $fckphp_config['MaxDirNameLength']=25;
  165.  
  166. $fckphp_config['DirNameAllowedChars']=array();
  167.  
  168.     //Allow numbers
  169.     for($i=48;$i<58;$i++array_push($fckphp_config['DirNameAllowedChars'],chr($i));
  170.     
  171.     //Allow lowercase letters
  172.     for($i=97;$i<123;$i++array_push($fckphp_config['DirNameAllowedChars'],chr($i));
  173.     
  174.     //Allow uppercase letters
  175.     for($i=65;$i<91;$i++array_push($fckphp_config['DirNameAllowedChars'],chr($i));
  176.     
  177.     //Allow space,dash,underscore,dot
  178.     array_push($fckphp_config['DirNameAllowedChars']," ","-","_",".");
  179.     
  180. $fckphp_config['FileNameAllowedChars']=$fckphp_config['DirNameAllowedChars'];
  181. array_push($fckphp_config['FileNameAllowedChars'],')','(','[',']','~');
  182. /*==============================================================================*/
  183.  
  184.  
  185. /*------------------------------------------------------------------------------*/
  186. /* Debugging :-                                    */
  187. /*  - Debug    :: Boolean, if set to true a copy of the connector output is     */
  188. /*            sent to a file as well as to the client.        */
  189. /*  - DebugOutput :: File to send debug output to (absolute path)        */
  190. /*------------------------------------------------------------------------------*/
  191.  
  192. $fckphp_config['Debug']=false;
  193. $fckphp_config['DebugOutput']="C:\Programmi\EasyPHP1-8\www\debug.txt";
  194.  
  195. #Log PHP errors
  196. $fckphp_config['Debug_Errors']=false;
  197. $fckphp_config['Debug_Trace']=false;
  198.  
  199. #Log Connector output
  200. $fckphp_config['Debug_Output']=false;
  201.  
  202. #With each logged event display contents of
  203. /* $_GET */ $fckphp_config['Debug_GET']=false;
  204. /* $_POST */ $fckphp_config['Debug_POST']=false;
  205. /* $_SERVER */ $fckphp_config['Debug_SERVER']=false;
  206. /* $_SESSIONS */ $fckphp_config['Debug_SESSIONS']=false;
  207.  
  208. /*==============================================================================*/
  209.  
  210.  
  211. /*------------------------------------------------------------------------------*/
  212. /* Internals :-                                    */
  213. /*    ResourceTypes :: Array of valid resource areas                */
  214. /*    Commands :: Array of valid commands accepted by the connector        */
  215. /*------------------------------------------------------------------------------*/
  216. $fckphp_config['ResourceTypes'array('File','Image','Flash','Media');
  217. $fckphp_config['Commands'array(
  218.                 "CreateFolder",
  219.                 "GetFolders",
  220.                 "GetFoldersAndFiles",
  221.                 "FileUpload",
  222.                 "Thumbnail",
  223.                 "DeleteFile",
  224.                 "DeleteFolder",
  225.                 "GetUploadProgress",
  226.                 "RenameFile",
  227.                 "RenameFolder"
  228.                 );
  229. /*==============================================================================*/
  230.  
  231. ?>

Documentation generated on Mon, 05 May 2008 16:18:07 +0400 by phpDocumentor 1.4.0